package com.ruoyi.dailycheck.service.impl;

import com.ruoyi.dailycheck.domain.EasDailycheck;
import com.ruoyi.dailycheck.mapper.EasDailycheckMapper;
import com.ruoyi.dailycheck.service.IEasDailycheckService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.apache.ibatis.cursor.Cursor;

import java.util.List;

/**
 * 设备点检Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-02
 */
@Service
public class EasDailycheckServiceImpl implements IEasDailycheckService {
    @Autowired
    private EasDailycheckMapper easDailycheckMapper;

    /**
     * 查询设备点检
     *
     * @param ID 设备点检主键
     * @return 设备点检
     */
    @Override
    public EasDailycheck selectEasDailycheckByID(String ID) {
        return easDailycheckMapper.selectEasDailycheckByID(ID);
    }

    /**
     * 滚动查询设备点检列表
     *
     * @param easDailycheck 查询条件
     * @param lastId        上次查询的最后一条记录ID
     * @param pageSize      每页大小
     * @return 设备点检集合
     */
    @Override
    public List<EasDailycheck> selectEasDailycheckListByScroll(EasDailycheck easDailycheck, String lastId, int pageSize) {
        return easDailycheckMapper.selectEasDailycheckListByScroll(easDailycheck, lastId, pageSize);
    }

    /**
     * 使用游标查询设备点检列表（用于大数据导出）
     *
     * @param params 查询条件
     * @return 设备点检游标
     */
    @Override
    @Transactional(readOnly = true)
    public Cursor<EasDailycheck> selectEasDailycheckByCursor(EasDailycheck params) {
        return easDailycheckMapper.selectEasDailycheckByCursor(params);
    }

}